/*
 * @Author: 15956982113 493885262@qq.com
 * @Date: 2025-05-29 17:14:07
 * @LastEditors: 15956982113 493885262@qq.com
 * @LastEditTime: 2025-05-30 11:36:35
 * @FilePath: \v3-webpackf:\project\v3-vite\vite.config.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import Components from 'unplugin-vue-components/vite'
import AutoImport from 'unplugin-auto-import/vite';
import { VantResolver } from 'unplugin-vue-components/resolvers'

import path from 'path'
// https://vite.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    AutoImport({
      resolvers: [VantResolver()],
    }),
    Components({
      resolvers: [VantResolver()],
    }),
  ],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src') // 将 @ 映射为 src 目录
    }
  },
})
